package com.ruoyi.system.domain.bo;

import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import java.util.Date;

import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 聊天详情业务对象 p_chat_details
 *
 * @author ruoyi
 * @date 2022-08-22
 */

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel("聊天详情业务对象")
public class PChatDetailsBo extends BaseEntity {

    /**
     *
     */
    @ApiModelProperty(value = "", required = true)
    @NotNull(message = "不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 聊天主表id
     */
    @ApiModelProperty(value = "聊天主表id", required = true)
    @NotNull(message = "聊天主表id不能为空", groups = { AddGroup.class, EditGroup.class })
    private String chatId;

    @ApiModelProperty(value = "订单表id", required = true)
    private String orderId;
    /**
     * 消息所有者id
     */
    @ApiModelProperty(value = "消息所有者id", required = true)
    @NotNull(message = "消息所有者id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long userId;

    /**
     * 消息
     */
    @ApiModelProperty(value = "消息", required = true)
    @NotBlank(message = "消息不能为空", groups = { AddGroup.class, EditGroup.class })
    private String content;

    /**
     * 是否是最后一条消息
     */
    @ApiModelProperty(value = "是否是最后一条消息", required = true)
    @NotNull(message = "是否是最后一条消息不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long isLatest;

    /**
     * 是否是发送者
     */
    private int type;
    /**
     * 头像
     */
    private String pic;

    private int status;


}
